home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-03-23 | 4.2 KB | 91 lines | [TEXT/GEOL] |
- Item 4421520 18-March-90 22:12PST
-
- From: D0114 Compuneering Inc, Erez Anzel,IDV
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: WriteToDeskScrap/color problm
-
- Link sent 90.03.19 0110 EST
- To: MacApp.TECH$
-
- SUBJECT: Help WriteToDeskScrap/color problem
-
- Dear Doctor,
-
- I bit the bullet and converted my massive application from 1.1 to 2.0B9. It's
- more or less converted, but some problems have popped up.
-
- I am using the following:
- Mac IIci, 8MB RAM, 80MB internal drive
- Apple RGB 13" color monitor (no video card)
- MultiFinder (2600K for MPW)
- System 6.0.4
- MPW 3.0
- MacApp 2.0B9
-
- The major problem probably has something to do with color. My program has its
- roots in DrawShapes from three years ago. It has a color menu just like in
- DrawShapes. Old versions of my program work fine. When I compile DrawShapes
- now, it works fine. But when I compile my program now (debug version), it
- exhibits various odd symptoms, such as:
- • it shows all the Color menu items in black and white;
- • when I select a shape in my drawing window (the main view of which is
- called TDiagView; it is something like TShapeView), then choose an item from
- the Color menu, the shape sometimes stays black, and sometimes changes to a
- seemingly random color, no matter which menu item I choose (the "wrong" color
- is consistent though);
- • if I choose the Color Picker item from the menu, it works fine: the
- color of the selected shape changes correctly;
- • if I select a shape, copy it, then open up the Scrapbook, it crashes with
- System Error = 12. The crash occurs if I run on a Plus without MultiFinder,
- and on the IIci with or without MultiFinder. It would probably crash on the
- Plus with MultiFinder as well.
-
- I use view templates (created with ViewEdit); they are stored in a .rsrc file.
- I create the views in TMyDoc.DoMakeViews by calling NewTemplateWindow. I
- assign a print handler just before leaving DoMakeViews. I override IRes. I
- also have an IDiagView method for creating the view for the clipboard. I
- usually don't use any offscreen bitmaps.
-
- The crash occurs while in TDiagView.WriteToDeskScrap. While using MultiFinder,
- it would occur when the program tries to write out the PICT stuff to the scrap.
- Without MultiFinder, it waits until writing out my own format, then it dies.
- The crash is always indicated by the bomb box, not by any message in the Debug
- window. TDiagView.WriteToDeskScrap normally calls INHERITED WriteToDeskScrap,
- so I stripped out that line and substituted all the code that is in
- TView.WriteToDeskScrap. I put in lots of Writeln's to step through it all. If
- I comment out all the stuff from OpenCPort through CloseCPort, then it doesn't
- crash (and doesn't write out PICT stuff either). If I just comment out the
- call to Draw and replace it with a simple MoveTo and Line, it still crashes.
- If I substitute OpenPort(@tempPort) for OpenCPort(@tempCPort) and
- ClosePort(@tempPort) for CloseCPort(@tempCPort), it still crashes.
-
- My qdExtent is reasonable (e.g. 0, 0, 100, 100). My picture handle is not NIL.
- The frame rect in the newly created picture is reasonable. The shape appears
- correctly in my application's clipboard window.
-
- DrawShapes creates its views without templates. Dave Wilson's Bird program
- uses templates, but does not have copying. None of the other sample programs
- have color drawing (or any drawing for that matter).
-
- I create the print handler in TMyDoc.DoMakeViews (like in Bird), though the
- problem is still there if I create it in TDiagView.IRes (like in DoubleVision).
- Do I need something like SetPalette and ActivatePalette as in DoubleVision?
- It's not done like that in DrawShapes. I have a horizontal and a vertical
- ruler in my main window; I did it as it was done in DoubleVision.
-
- I have other views in other windows that export just TEXT to the clipboard when
- you choose Copy while they are active. I have not encountered any problem with
- them.
-
- I gotta get over this hump. Bug. Humbug!. Please help! Any ideas would be
- greatly appreciated. If you think you have an answer, please link me, then
- call me (collect if need be) at 416-738-4601 ASAP to let me know you've
- responded. We are in the Eastern time zone.
-
- Thanks.
-
- See ya.......Erez
-
-